$(document).ready(function(){
    var wx_link = window.location.href;
    var wx_imgUrl = SHARE_CONFIG.img;
    var wx_title=SHARE_CONFIG.title;
    var wx_desc=SHARE_CONFIG.desc;
    wx.config({
      debug: false,
      appId: SHARE_CONFIG.appId,
      timestamp: SHARE_CONFIG.timestamp,
      nonceStr: SHARE_CONFIG.nonceStr,
      signature: SHARE_CONFIG.signature,
      jsApiList: [
        'onMenuShareTimeline',
        'onMenuShareAppMessage'
      ]
    });
    wx.error(function(res) {  });
    var wx_init=function(){
        wx.onMenuShareAppMessage({
            title:wx_title,
            desc: wx_desc, 
            link: wx_link, 
            imgUrl: wx_imgUrl, 
            type: '', 
            dataUrl: '', 
            success: function() {
                
            },
            cancel: function() {
            }
        });
        wx.onMenuShareTimeline({
            title: wx_title,
            link: wx_link,
            imgUrl: wx_imgUrl,
            success: function() {
               
            },
            cancel: function() {
            }
        });
    
    }
    wx.ready(wx_init);
    });